: Operators in PHP --- arithmetic operators, logical operators, value assignment operators, and comparison operators: 1. arithmetic operators common arithmetic operators calculation type operators example result calculation inverse operations -- $ a
Turn... Bit operations in C #, non-logical ~, Logical and &, logical or |, logical XOR or ^, logical left shift
In C #, we will use in-place operations. For example, to determine whether a number is the power of 2, how to determine whether a
Assignment operatorsThe PHP assignment operator is used to write values to variables. The base assignment operator in PHP is "=".This means that the right-hand copy expression sets the value for the left-hand operand._________________________________
1. Arithmetic operators
Common arithmetic operators
Type of operation
Operator
Example
Results
Take inverse operation
-
-$a
Returns a negative value of $ A
Addition operation
+
$a +
Precautions:
Constants are assigned at compile time, and variables are allocated in memory when they are run.
Assignment operator + =-+ *+%= \= The Java compiler enforces type conversions
Residual:In Java, it is time to take the
Operators in PHP --- Arithmetic Operators, logical operators, value assignment operators, comparison operators, and operator assignment
1. Arithmetic Operators
Common Arithmetic Operators
Operation Type
Operator
Example
Result
C # overview of various operators and functions of operators,I. []
Square brackets ([]) are used for arrays, indexers, and attributes, and can also be used for pointers.
1. the array type is a type followed:
Int [] fib = new int [100]; // create an
For more information about array operators (+), string operators (.), AND logical operators (& AND | or xor), see.
Php array Operators
$ A + $ B join $ a and $ B.$ A = $ B is equal. If $ a and $ B have the same key/value pair, the value is TRUE.$ A =
The logical (Boolean) operator is used to perform an operation on an expression of the Boolean result, and the result of the operation is a Boolean. The results of the operation are as follows:Operator Operation Example Results& and (with)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.